<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:U('Constant/index')}">字典列表</a></li>
			<li class="active"><a href="{:U('Constant/add')}">增加常量</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:U('Constant/add_post')}">
			<fieldset>
				<div class="control-group">
					<label class="control-label">上级:</label>
					<div class="controls">
						<select name="parentid">
							<option value="0">作为一级菜单</option>
							{$list}
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">常量名:</label>
					<div class="controls">
						<input type="text" name="pname">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">常量值:</label>
					<div class="controls">
						<input type="text" name="pvalue">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">排序:</label>
					<div class="controls">
						<input type="text" name="listorder">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">备注:</label>
					<div class="controls">
						<textarea name="mark" rows="5" cols="57" style="width: 500px;"></textarea>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">图标:</label>
				&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden"  name="picon" id="thumb" value="{$model.picon}">
				<a href="javascript:void(0);" onclick="flashupload('thumb_images', '图片上传','thumb',thumb_images,'10,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
				 <if condition="empty($model['picon'])">
				<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview"
				width="135" style="cursor: hand" />
				 <else />
				<img src="{$model.picon}" id="thumb_preview" width="135" style="cursor: hand" />
				 </if>
				</a>
				<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
				 value="取消图片">
				</div>
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
				<a class="btn" href="{:U('Constant/index')}">返回</a>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	 <script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
</body>
</html>